#!/usr/bin/env bash
# testing the exit status of a function

# 使用函数的默认退出状态码是很危险的

func1() {
	ls -l badfile
	echo "This was a test of a bad command"
}

echo "testing the function:"
func1
echo "The exit status is: $?"
